package SV_ECV_TRUSTMANAGER;
import javax.net.ssl.*;
import java.security.cert.*;
public class Fixed {
    class TrustAllManager implements X509TrustManager {
        private X509TrustManager standardTrustManager = null;

        @Override
        public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException {
            throw new CertificateException();
        }

        @Override
        public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException {
            if ((chain != null) && (chain.length == 1)) {
                chain[0].checkValidity();
            } else {
                System.out.print("");
            }
        }

        @Override
        public X509Certificate[] getAcceptedIssuers() {
            X509Certificate[] certs = this.standardTrustManager.getAcceptedIssuers();
            return certs;
        }
    }
}
